package labox.innovation.gameserver.network.clientpackets;

import labox.innovation.gameserver.model.actor.instance.FuzePcInstance;
import labox.innovation.gameserver.network.SystemMessageId;
import labox.innovation.gameserver.network.serverpackets.SystemMessage;

public class RequestChangePkModel extends L2GameClientPacket {
	private static final String _C_RQESTCHANGEMODEL="_C_RequestChangePkModel";
	private int _pkModel;
	@Override
	public String getType() {
		return _C_RQESTCHANGEMODEL;
	}

	@Override
	protected void readImpl() {
		_pkModel=readByte();

	}

	@Override
	protected void runImpl() {
		FuzePcInstance activeChar=getClient().getActiveChar();
		if(activeChar==null){
			return;
		}
		activeChar.getPkInstance().setCurrentPkType(_pkModel);
		SystemMessage msg=new SystemMessage(SystemMessageId.YOUR_PK_MODEL_CHANGED);
		msg.addString(activeChar.getPkInstance().getPkTypeName(_pkModel));
		activeChar.sendPacket(msg);
	}

}
